//
//  PrefixHeader.h
//  beautyAccompany
//
//  Created by xiaocankeji on 15/10/30.
//  Copyright © 2015年 xiaocankeji. All rights reserved.
//

#ifndef PrefixHeader_h
#define PrefixHeader_h


#import "UIViewAdditions.h"

//Models
#import "MPUser.h"
#import "MPGallery.h"
#import "MPGift.h"
#import "MPGiftRecord.h"
#import "MPIncomeRecord.h"
#import "MPFeedback.h"
#import "MPCategory.h"

#import <AVOSCloud/AVOSCloud.h>
#import <AVOSCloudSNS.h>
#import <AVOSCloudSNS/AVUser+SNS.h>
#import "EaseUI.h"
#import "EaseMob.h"
#import "HUD.h"
#import "Utils.h"
#import "UMSocial.h"
#import <BFPaperButton.h>
#import <POP.h>
#import "ShareData.h"


#define MPKF @"mpsystem"

//字体
#define FontName      IS_IOS8 ? @".HelveticaNeueInterface-Regular" : @".HelveticaNeueInterface-M3"
#define kFont(a) [UIFont fontWithName:FontName size:a]

#define IS_IOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8)
//从本地加载图片
#define ReadImageFromBundle(a,b)  ([UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:a ofType:b]])
// 获取RGB颜色
#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
#define SelectViewClolor ([UIColor colorWithRed:246/255.0 green:89/255.0 blue:118/255.0 alpha:1])
//获取设备的物理宽度
#define DeviceWidth [UIScreen mainScreen].bounds.size.width
//获取设备的物理高度
#define DeviceHeight [UIScreen mainScreen].bounds.size.height
#define kMyTabBarHeight 49
#define kNavigationBarHeight 64

// 判断屏幕是否是iphone以上的大屏
#define IS_WIDESCREEN ( [ [ UIScreen mainScreen ] bounds ].size.height >= 568 )
#define IS_IPHONE_4 ( [ [ UIScreen mainScreen ] bounds ].size.height == 480 )
#define IS_IPHONE_5 ( [ [ UIScreen mainScreen ] bounds ].size.height == 568 )
#define IS_IPHONE_6 ( [ [ UIScreen mainScreen ] bounds ].size.height == 667 )
#define IS_IPHONE_6_PLUS ( [ [ UIScreen mainScreen ] bounds ].size.height == 736 )

// 小灰条消息类型
#define EMMESSAGE_EXT_TYPE_CHAT_NOTIFICATION_MSG 1
//礼物
#define EMMESSAGE_EXT_TYPE_GIFT_MSG 3

/**************支付宝***************/
#define AlipayPARTNER @"2088811117366572"
#define AlipaySELLER @"2394814529@qq.com"
#define AlipayRSA_PRIVATE @"MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJYaw9a0xoL1LDITIBA40wQoF5Oj5kzSsbfi/IJPHkXDwgL9AFrg30ZXlRCA1KPsPwi2OwMakA50VOLSyeZ6NmKlw13OWOGYdxxsZpjBtjEEA8pjuQeZDbIYpA4Env+HsbQKJYulbW21rf0+xCT72kIZBag6LRDYJxhnJDrB/yF7AgMBAAECgYB0KUBW/s0E+XD7S3ursh3zAIfGVLdbyk2IDdv1h/7YZHbW0y4cJhwDlrGf9OMZ/DCHsGaYr0y+Mt6iLhfbCcbdfxwGBYkX7Hs/B7n0hKdssJh7mPjoakrycH1etRxHuaLi6W2zwRK8pcY+5PrieYspr414hKLsJkHVITksOaefGQJBAMUPv7PWTbJrwSoiRrsv1dvRzYlpjOs9Mm+bL3cLrQJqUt4fGgpeHMsNDqqXXOzAXCOES+98J7CHRZeysGuvSQUCQQDC/7MdLLSRpbhaKZEaPG6XGcNiI6itSFnD//6g0nVyDKM/rXAu89kt7dbQQLZUYGHNwSl7XjjGZa7dr7WpZsh/AkBLKnSu/iFo2x01GxnrsJVcYayKq44q9I7Wb1UtjXCSqUeuniJqrfdBpFthypaRX9ZFXeMxGCRze0WaVXhhutyZAkAY9q8xfvWm57ZQJJ4k47OsuGmg+LuxY1/Kjc1FPWw3q5KCpmuEN0eIb7hedMpixuv+cUokNw3BqGbYjpQNGdF1AkBisoVPVTSvtdyP9CtNpT9Y8wriyHE7dJojWSizMwGrOS0Zwqc3aXcK/296qapCLMriCkFNj42oK8wqnAxxDq00"

/**************leancloud后台返回码***************/
#define AVOS_RES_CODE_SERVER_ERROR 1
#define AVOS_RES_CODE_SMS_CODE_INVALID 1
#define AVOS_RES_CODE_MOBILE_INVALID 127
#define AVOS_RES_CODE_PWD_ERROR 210           // 密码错误
#define AVOS_RES_CODE_USER_NOT_EXIST 211      // 用户不存在
#define AVOS_RES_CODE_PHONE_NOT_EXIST 213     // 手机号不存在（找回密码）
#define AVOS_RES_CODE_MOBILE_EXIST 214
#define AVOS_RES_CODE_PHONE_NOT_VERIFIED 215

/**
 *  百度地图App key
 */
#define  kBaiduMapAppKey @"33OHvl9yqTcVnrfN0cTQz3Tc"


/**************友盟**************/
#define UM_KEY              @"54d30f69fd98c5174f000ac0"
/**************新浪微博授权**************/
#define WEIBO_APP_KEY         @"3062358726"
#define WEIBO_REDIRECT_URI    @"https://api.weibo.com/oauth2/default.html"

/**************QQ微博授权**************/
#define QQ_APP_KEY          @"JVSuqFVQjNWJJvSI"
#define QQ_APP_ID           @"1104588970"

//APP主色调
#define APPCOLOR(a) RGBA(246 , 101 , 106 , a)
#define APPCOLORBACKGROUNDCOLOR(a) RGBA(229, 229, 229, a)


#define KNOTIFICATION_LOGINCHANGE @"loginStateChange"
#endif /* PrefixHeader_h */

//0则不打印任何东西
#if 1

#define NSLog(FORMAT, ...) fprintf(stderr,"[%s:%d行] %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
#else

#define NSLog(FORMAT, ...) nil

#endif

//0则生产环境
#if DEBUG
/*********************LeanCloud配置,测试版本*********************/
//测试
#define AVOS_APP_ID @"AzEua5DBuxtkpUePRcawzlIO"
#define AVOS_APP_KEY @"wB4WuQKUCgFpOMuNR5ASXktx"
#define AVOS_APP_DeviceProfile @"MP_dev"  // (美陪上的证书)
//#define AVOS_APP_DeviceProfile @"MPT_dev"  (美陪师上的证书)

/**************环信配置, 测试环境***************/
#define EASEMOB_APPKEY @"xiaocan#mepeidev"//测试
#define EASEMOB_APNS_CERT_NAME @"MP_dev"  //测试(美陪上的证书)
//#define EASEMOB_APNS_CERT_NAME @"MPT_dev"  //测试 (美陪师上的证书)

#else

/*********************LeanCloud配置,正式版本*********************/
////正式

#define AVOS_APP_ID @"AzEua5DBuxtkpUePRcawzlIO"
#define AVOS_APP_KEY @"wB4WuQKUCgFpOMuNR5ASXktx"
#define AVOS_APP_DeviceProfile @"MP_pro" //(美陪上的证书)
//#define AVOS_APP_DeviceProfile @"MPT_pro" //(美陪师上的证书)

/**************环信配置***************/
#define EASEMOB_APPKEY @"xiaocan#mepeidev"//上线
#define EASEMOB_APNS_CERT_NAME @"MP_Pro"  //上线(美陪上的证书)
//#define EASEMOB_APNS_CERT_NAME @"MPT_Pro"  //上线(美陪师的证书)
#endif